﻿using System;
using System.Collections.Generic;

namespace SocialFront.Providers.Blog
{
    [SectionName("SocialFrontBlog")]
    public abstract class BlogBase : SocialFrontProviderBase
    {
        // Data Management
        public abstract Entities.Blog CreateBlog(Entities.Blog blog);
        public abstract Entities.Blog UpdateBlog(Entities.Blog blog);
        public abstract void DeleteBlog(int id);
        public abstract void DeleteBlog(Entities.Blog blog);
        // Data Request
        public abstract Entities.Blog GetBlogById(int id);
        public abstract System.Xml.XPath.XPathNodeIterator GetBlogXmlById(int id);

        public abstract List<Entities.Blog> GetAllBlogs();
        public abstract List<Entities.Blog> GetAllBlogs<T>(Func<Entities.Blog, T> sortField);
        public abstract List<Entities.Blog> GetAllBlogs<T>(int? pageSize, Func<Entities.Blog, T> sortField);
        public abstract List<Entities.Blog> GetAllBlogs<T>(int? pageSize, int? page, Func<Entities.Blog, T> sortField);
        public abstract List<Entities.Blog> GetAllBlogs<T>(int? pageSize, int? page, out int total, Func<Entities.Blog, T> sortField);

        public abstract List<Entities.Blog> GetBlogsByMember(int id);
        public abstract List<Entities.Blog> GetBlogsByMember(Entities.Member member);
        public abstract List<Entities.Blog> GetBlogsByMember(int id, int page, int? pageSize);
        public abstract List<Entities.Blog> GetBlogsByMember(Entities.Member member, int page, int? pageSize);
        public abstract List<Entities.Blog> GetBlogsByMember(int id, int page, int? pageSize, out int total);
        public abstract List<Entities.Blog> GetBlogsByMember(Entities.Member member, int page, int? pageSize, out int total);

        public abstract string GetMemberBlogUrl(int memberId);
        public abstract string GetMemberBlogUrl(Entities.Member member);
    }
}